<%--
  Created by IntelliJ IDEA.
  User: ASUSS
  Date: 2016/8/12
  Time: 20:34
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>修改博文</title>
    <!--链接BootStrap的css文件-->
    <link rel="stylesheet" type="text/css" href="http://cdn.bootcss.com/bootstrap/3.3.4/css/bootstrap.min.css">
    <script type="text/javascript" src="http://cdn.bootcss.com/jquery/1.11.2/jquery.min.js"></script>
    <script type="text/javascript" src="http://cdn.bootcss.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>

</head>
<body>
<div class="container">
    <h1>修改博文</h1>
    <hr/>
    <form:form action="updateBlogPost/${id }" method="post" commandName="blogP" role="form">
        <div class="form-gruop">
        <input style="display:none" name="id" value="${blog.id }"/>
            <label for="title">文章标题</label>
            <input type="text" class="form-control" id="title" name="title" value="${blog.title }"/>
        </div>
        <div class="form-group">
            <label for="">作者</label>
			<span>${blog.userId }</span>
        </div>
        <div class="form-group">
            <label for="content">文章内容</label>
            <textarea name="content" id="content" cols="30" rows="10" class="form-control" placeholder="请输入你的文章内容"> ${blog.content }</textarea>
        </div>
        <div class="form-group">
            <label for="pub_date">发布时间</label>
            <span><fmt:formatDate value="${blog.pubTime}" pattern="yyyy-MM-dd" /></span>

        </div>
        <div class="form-group">
            <button type="submit" class="btn btn-sm btn-success">
                提交
            </button>
        </div>
    </form:form>
</div>
</body>
</html>
